package com.hmall.feign.pojo;

import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
public class ItemDoc {
    private Long id;//商品id
    private String name;//商品名称
    private Long price;//价格（分）
    private String image;//商品图片
    private String category;//分类名称
    private String brand;//品牌名称
    private Integer sold;//销量
    private Integer commentCount;//评论数


    public ItemDoc(Item item) {
        this.brand=item.getBrand();
        this.id=item.getId();
        this.name=item.getName();
        this.image=item.getImage();
        this.commentCount=item.getCommentCount();
        this.category=item.getCategory();
        this.sold=item.getSold();
        this.price=item.getPrice();
    }

}
